from django.shortcuts import render
from django.http import HttpResponse
from paper.models import QuestionType,Question,Choice,Answer
# Create your views here.

def dianxuan(request):
    return HttpResponse('选择目录')

def dianxuan_danxuanti(request):

    q_type = QuestionType.objects.get(
        question_type = '单选题')
    question_list = q_type.question_set.all()

    context = {'question_list':question_list}

    return render(request,
                  'dianxuanshijuan/danxuanti.html',
                  context,
                  )


















    
    
